<template>
	<view style="height: 100%;padding: 20rpx;">
		<view class="goods">
			<view class="goodsBox" v-for="(item,index) in 9" :key="index" @click="toDetails">
				<view class="imgBox">
					<image src="../../static/test/userheader.jpg" mode="aspectFill"></image>
				</view>
				<view class="copywriting">
					啊收到了喀什觉得按时打卡是打开奥斯卡德拉克斯觉得啊啊啊啊啊
				</view>
				<view class="money flex">
					<view class="" style="color: #C4516E;">
						<text style="font-size:26rpx ;">￥</text><text>1</text>
					</view>
					<view class="" style="font-size:26rpx; color: #787878;">
						已售4000+
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "GoodsList",
		data() {
			return {

			};
		},
		methods: {
			toDetails() {
				uni.navigateTo({
					url: '/publicPages/goods/details'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.goods {
		width: 100%;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;

	}

	.money {
		padding: 15rpx 10rpx;
		justify-content: space-between;
	}

	.copywriting {
		font-size: 26rpx;
		padding: 10rpx 10rpx 5rpx 10rpx;
		overflow: hidden;
		display: -webkit-box;
		-webkit-box-orient: vertical;

		text-overflow: ellipsis;
		word-break: break-all;
		-webkit-line-clamp: 2;
	}

	.goodsBox {
		margin-bottom: 20rpx;
		width: 49%;
		border-radius: 25rpx;
		background-color: white;
	}

	.imgBox {
		width: 100%;
		border-radius: 25rpx 25rpx 0rpx 0rpx;

		image {
			border-radius: 25rpx 25rpx 0rpx 0rpx;
			width: 100%;
			height: 300rpx;
		}
	}
</style>